package com.itfreer.gis.server.vector.mapbox;

import com.google.common.collect.ImmutableSet;
import com.itfreer.gis.server.vector.generate.VectorTileBuilderFactory;

import java.util.Set;

/**
 * 定义矢量切片构建工厂接口
 */
public class MapBoxTileBuilderFactory implements VectorTileBuilderFactory {

	public static final String MIME_TYPE = "application/vnd.mapbox-vector-tile";
	public static final String LEGACY_MIME_TYPE = "application/x-protobuf;type=mapbox-vector";

	public static final Set<String> OUTPUT_FORMATS = ImmutableSet.of(MIME_TYPE, LEGACY_MIME_TYPE, "pbf");

	@Override
	public Set<String> getOutputFormats() {
		return OUTPUT_FORMATS;
	}

	@Override
	public String getMimeType() {
		return MIME_TYPE;
	}

	@Override
	public MapBoxTileBuilder newBuilder() {
		return new MapBoxTileBuilder();
	}
}
